#!/usr/bin/env python
# -*- encoding: utf-8 -*-

import math

def isPrime(n):
    # an even number cant be a prime (divisible by 2)
    # 1 and 0 are no primes
    # special case: 2 is a prime
    if (n % 2 == 0 and n != 2) or n <= 1:
        return False
    # get a list of all uneven numbers above 3 till the sqrt of n + 1
    for i in xrange(3, int(math.sqrt(n)) + 1, 2):
        if n % i == 0:
            return False
    return True

def divisorCount(x):
    count = 2 #1 and x itself
    squareroot = math.sqrt(x)
    for i in xrange(2, int(squareroot) + 1):
        if x % i == 0:
            if i != squareroot: count += 2
            else: count += 1
    return count


version = '0.2'
